from views.login_page import LoginPage
from views.signin_page import SigninPage
from views.main_page import MainPage


class Controller:

    def __init__(self):
        pass

    # 跳转到登录界面
    def show_login(self):
        self.login = LoginPage()
        self.login.switch_siginin_window.connect(self.show_signin)
        self.login.switch_main_window.connect(self.show_main)
        self.login.show()

    def show_signin(self):
        self.signin = SigninPage()
        self.signin.switch_loginin_window.connect(self.show_login)
        self.login.close()
        self.signin.show()

    # 跳转到主页面
    def show_main(self):
        self.main = MainPage()
        self.login.close()
        self.main.show()


